home *** CD-ROM | disk | FTP | other *** search
- Path: portland.caps.maine.edu!dseama41
- Organization: University of Maine System
- Date: Thu, 22 Feb 1996 17:11:41 EST
- From: Starduster <DSEAMA41@portland.caps.maine.edu>
- Message-ID: <96053.171141DSEAMA41@portland.caps.maine.edu>
- Newsgroups: comp.lang.c++
- Subject: Re: pow(-1,1.1) = DOMAIN error
- References: <Christian.Straka.15.0010E3C9@uni-konstanz.de>
-
- In article <Christian.Straka.15.0010E3C9@uni-konstanz.de>,
- Christian.Straka@uni-konstanz.de (Christian Straka) says:
- >The pow() and powl() function in <math.h> doesn't work properly. The following
- >example causes a DOMAIN error exception (see defs in math.h):
- >
- > pow(-1,1.1);
- >
- >Has anyone an idea to fix this problem?
- Goodness! I just tried the same thing and got the same error message! Then
- I tried it in MS-DOS QBasic and got "Illegal Function Call"! Same bug exists
- there!! But the clincher was when I tried it on my pocket calculators (TI-30X
- Solar. Sci and Casio fx-115n) and they gave me ERROR and -E- too, respectively!
- )
- I have trashed the Casio as it is obviously in error (out of warranty) and the
- TI I have sent back to Texas Instruments for the repair it obviously needs. I
- am so glad to now Turbo C++ and QBasic both have this bug as well...forwarned
- is forearmed, ya know!!
- (Hmm...."DOMAIN"...I wonder if that has any actual meaning? Maybe in the
- context of mathmatics? Naw! THat was just a random word the program threw up
- before it crashed...it can't mean I was in error at any point! Although when
- I did try to divide by zero and take the square root of a negative number in
- an earlier program, equally funky errors occured.)
-
- :)
-